package com.xiaochang.em.controller;


import com.xiaochang.em.common.Result;
import com.xiaochang.em.service.ExampleService;
import com.xiaochang.em.service.StarService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/api/example")
public class ExampleController {

    @Resource
    private ExampleService exampleService;

    @GetMapping
    public Result findAll() {

        return Result.success(exampleService.allExample());
    }

}
